<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>


		<title>用户注册</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		
	
	
		<script type="text/javascript"> 
      function reloadImg(){ 
      var i = Math.random(); 
      document.getElementById("imgCode").src="AuthImg.jpg?"+i; 
    }

 </script>
 

	</head>
 
	<body>
		
		<s:form action="saveUser" theme="simple">


			<table border="0">
				<tr>
					<td align="right">
						登陆账号：
					</td>
					<td>
						<s:textfield name="user.accountName" onblur="validateName"></s:textfield>
						*
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>user.accountName</s:param>
						</s:fielderror>
					</td>
				</tr>
				<tr>
					<td align="right">
						Email：
					</td>
					<td>
						<s:textfield name="user.email"></s:textfield>
						*
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>user.email</s:param>
						</s:fielderror>
					</td>
				</tr>
				<tr>
					<td align="right">
						密码：
					</td>
					<td>
						<s:password name="user.password" label="密码"></s:password>
						*
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>user.password</s:param>
						</s:fielderror>
					</td>
				</tr>
				<tr>
					<td align="right">
						重复密码：
					</td>
					<td>
						<s:password name="user.repassword" label="确认密码"></s:password>
						*
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>repassword</s:param>
						</s:fielderror>
					</td>
				</tr>
				<tr>
					<td align="right">
						密保问题：
					</td>
					<td>
						<s:select list="{'最喜欢的宠物?','最喜爱的电影?','周年纪念日?','父亲的名字?','配偶的名字?'}"
							name="user.question" label="密码问题" headerKey="-1"
							headerValue="请选择"></s:select>
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>user.question</s:param>
						</s:fielderror>
					</td>
				</tr>
				<tr>
					<td align="right">
						密保答案：
					</td>
					<td>
						<s:textfield name="user.answer" label="密码答案"></s:textfield>
						*
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>user.answer</s:param>
						</s:fielderror>
					</td>
				</tr>
				
				<tr>
					<td align="right">
						姓名：
					</td>
					<td>
						<s:textfield name="user.name" label="姓名"></s:textfield>
						*
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>user.name</s:param>
						</s:fielderror>
					</td>
				</tr>
				<tr>
					<td align="right">
						性别：
					</td>
					<td>
					<s:radio label="性别" name="user.sex" list="{'男','女'}" ></s:radio>							
					</td>
				</tr>
				


				<tr>
					<td align="right">
						地址：
					</td>
					<td>
						<s:textfield name="user.address" label="地址"></s:textfield>
					</td>

				</tr>


				<tr>
					<td align="right">
						电话：
					</td>
					<td>
						<s:textfield name="user.telephone" label="电话"></s:textfield>
						*
					</td>

					<td>
						<s:fielderror cssStyle="color:red">
							<s:param>user.telephone</s:param>
						</s:fielderror>
					</td>
				</tr>

				<tr>
					<td align="right">
						验证码：
					</td>
					<td>
						<s:textfield label="验证码" name="vercode">
						</s:textfield>
					</td>
					<td>
						<img name="d" id="imgCode" src="AuthImg.jpg" />
						<a href="javascript:reloadImg();">看不清？换一张</a>
					</td>
                  <td>
						<s:fielderror cssStyle="color:red">
							<s:param>vercode</s:param>
						</s:fielderror>
					</td>
					
				</tr>

				<tr>

					<td align="center" colspan="3">
						<s:submit label="submit" value="注册"></s:submit>
					</td>

				</tr>


			</table>
		</s:form>
	</body>
</html>
